﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.SessionState;
using System.Threading;
using HTTT.Bussiness;
using log4net;

namespace HTTT
{
    public class Global : System.Web.HttpApplication
    {
        private static readonly ILog log = LogManager.GetLogger("Global");
        void Application_Start(object sender, EventArgs e)
        {
            // Code that runs on application startup
            log4net.Config.XmlConfigurator.Configure(System.Configuration.ConfigurationManager.GetSection(
                "log4net") as System.Xml.XmlElement);
            log.Info("1 Do Application_Start");
            // Create thread to execute feed chanel task
            //ThreadStart tsFeedChanel = new ThreadStart(DoFeedChanel);
            //Thread FeedChanelTask = new Thread(tsFeedChanel);
            //FeedChanelTask.Start();
        }

        void Application_End(object sender, EventArgs e)
        {
            //  Code that runs on application shutdown
            log.Info("1 Application End");
        }

        void Application_Error(object sender, EventArgs e)
        {
            // Code that runs when an unhandled error occurs
            log.Info("1 Application Error");
        }

        void Session_Start(object sender, EventArgs e)
        {
            // Code that runs when a new session is started

        }

        void Session_End(object sender, EventArgs e)
        {
            // Code that runs when a session ends. 
            // Note: The Session_End event is raised only when the sessionstate mode
            // is set to InProc in the Web.config file. If session mode is set to StateServer 
            // or SQLServer, the event is not raised.

        }


    }
}
